import canvasAbstract from './canvasAbstract';
import config from '../config';
import model from '../model/boss'
export default new (class boss extends canvasAbstract implements ICanvas{
    num(): number {
        return config.boss.num;
    }
    model(): IModelAbstract {
        return model
    }
    render(): void {
        this.createModels()
        super.renderModels()
    }

    protected createModels(): void {
        [{x:config.canvas.width / 2,y:config.canvas.height - config.model.height}].forEach(position => {
            const model = this.model() as IModelAbstract;
            const instance = new model(position.x,position.y);
            this.models.push(instance);
        });
    }
})('boss');